import request from '@/utils/request'

export const getUnits = () => request.get('/api/unitinfo')

export const createUnit = (data) => request.post('/api/unitinfo', data)

export const updateUnit = (data) => request.put(`/api/unitinfo//${data.id}`, data)

export const deleteUnit = (id) => request.delete(`/api/unitinfo/${id}`)